package com.gillion.grule.client.sync;

import com.gillion.grule.client.core.BusinessModelAttribute;
import com.gillion.grule.client.core.DataSourceClient;
import com.gillion.grule.client.core.DubboConfig;
import com.gillion.grule.client.core.GroovyShellConfig;
import com.gillion.grule.client.core.RemoteConfig;
import com.gillion.grule.client.core.SpringCloudConfig;
import com.gillion.grule.client.core.variable.PackageVariable;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public class RulePackage implements Serializable {
    protected String groupId;

    public void setDataSources(List<DataSourceClient> dataSources) {
        this.dataSources = dataSources;
    }
    protected String artifactId;
    protected String version;
    public void setRemoteConfig(List<RemoteConfig> remoteConfig) { this.remoteConfig = remoteConfig; }
    public void setDubboConfigs(List<DubboConfig> dubboConfigs) { this.dubboConfigs = dubboConfigs; }
    public void setSpringCloudConfig(List<SpringCloudConfig> springCloudConfig) { this.springCloudConfig = springCloudConfig; }
    public void setGroovyShellConfigs(List<GroovyShellConfig> groovyShellConfigs) { this.groovyShellConfigs = groovyShellConfigs; }
    public void setValidatorConfig(Map<String, Map<String, Object>> validatorConfig) { this.validatorConfig = validatorConfig; }

    public String toString() { return "RulePackage(groupId=" + getGroupId() + ", artifactId=" + getArtifactId() + ", version=" + getVersion() + ", variables=" + getVariables() + ", businessModelAttributes=" + getBusinessModelAttributes() + ", dataSources=" + getDataSources() + ", remoteConfig=" + getRemoteConfig() + ", dubboConfigs=" + getDubboConfigs() + ", springCloudConfig=" + getSpringCloudConfig() + ", groovyShellConfigs=" + getGroovyShellConfigs() + ", validatorConfig=" + getValidatorConfig() + ", status=" + getStatus() + ")"; }




    protected PackageVariable variables = new PackageVariable();
    protected List<BusinessModelAttribute> businessModelAttributes = Lists.newArrayList();
    protected List<DataSourceClient> dataSources = Lists.newArrayList(); public List<DataSourceClient> getDataSources() { return this.dataSources; }
    protected List<RemoteConfig> remoteConfig = Lists.newArrayList(); public List<RemoteConfig> getRemoteConfig() { return this.remoteConfig; }
    protected List<DubboConfig> dubboConfigs = Lists.newArrayList(); public List<DubboConfig> getDubboConfigs() { return this.dubboConfigs; }
    protected List<SpringCloudConfig> springCloudConfig = Lists.newArrayList(); public List<SpringCloudConfig> getSpringCloudConfig() { return this.springCloudConfig; }
    protected List<GroovyShellConfig> groovyShellConfigs = Lists.newArrayList(); public List<GroovyShellConfig> getGroovyShellConfigs() { return this.groovyShellConfigs; }
    protected Map<String, Map<String, Object>> validatorConfig = Maps.newConcurrentMap(); private Integer status; public Map<String, Map<String, Object>> getValidatorConfig() { return this.validatorConfig; }





    public String getGroupId() {
        return this.groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getArtifactId() {
        return this.artifactId;
    }

    public void setArtifactId(String artifactId) {
        this.artifactId = artifactId;
    }

    public String getVersion() {
        return this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public PackageVariable getVariables() {
        return this.variables;
    }

    public void setVariables(PackageVariable variables) {
        this.variables = variables;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void addModelAttribute(BusinessModelAttribute attribute) {
        this.businessModelAttributes.add(attribute);
    }

    public List<BusinessModelAttribute> getBusinessModelAttributes() {
        return this.businessModelAttributes;
    }

    public void setBusinessModelAttributes(List<BusinessModelAttribute> businessModelAttributes) {
        this.businessModelAttributes = businessModelAttributes;
    }
}